package com.db.williamchart.animation;

import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;

import java.util.List;

public abstract class ChartAnimation<T> {
    private static final Long DEFAULT_DURATION = 1000L;

    public Long duration = DEFAULT_DURATION;
    public Interpolator interpolator = new DecelerateInterpolator();

    public abstract ChartAnimation<T> animateFrom(float startPosition, List<T> entries, AnimateFromCallback callback);

    public interface AnimateFromCallback {
        void callback();
    }

    public Long getDuration() {
        return duration;
    }

    public void setDuration(Long duration) {
        this.duration = duration;
    }

    public Interpolator getInterpolator() {
        return interpolator;
    }

    public void setInterpolator(Interpolator interpolator) {
        this.interpolator = interpolator;
    }
}
